package com.smartstate.dataManagement.controller;

import com.smartstate.dataManagement.dto.common.TreeNode;
import com.smartstate.dataManagement.entity.ObjMoudel;
import com.smartstate.dataManagement.entity.Objtype;
import com.smartstate.dataManagement.service.ObjMoudelService;
import com.smartstate.dataManagement.service.ObjTypeService;
import com.smartstate.dataManagement.vo.ResultVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>空间结构</p>
 * <p>@Author 陈永杰</p>
 * <p>@Date: 2022/9/6</p>
 * <p>@Time: 19:37</p>
 * <p>@version 1.0 <p>
 */
@RestController
@Api(tags = {"空间结构"})
@RequestMapping("/ObjType")
public class ObjTypeController {
    @Resource
    private ObjTypeService objTypeService;

    /**
     * 楼宇树结构
     * @return
     */
    @PostMapping("/selectAll")
    @ApiOperation(value = "空间结构")
    public ResultVO<List<Objtype>> selectMoudel() {
        return ResultVO.ok(objTypeService.selectAll());
    }
}